<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='UTF-8'>
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
<title>11事件修饰符once</title>
</head>
<body>

  <div id='app'>
    <button @click.once="fn">按钮</button>
  </div>

<script src='https://cdn.bootcdn.net/ajax/libs/vue/2.6.12/vue.js'></script>
<script>
  const app = new Vue({
    el: '#app'
    ,data:{
      msg: 'Hello Vue'
    }
    ,methods: {
      fn(){
        alert('once')
      }
    }
  })
</script>
</body>
</html>